﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    public class Receipt : XPLiteObject
    {
        int fReceiptID;
        [Key(true)]
        public int ReceiptID
        {
            get { return fReceiptID; }
            set { SetPropertyValue<int>("ReceiptID", ref fReceiptID, value); }
        }
        Supplier fSupplierID;
        public Supplier SupplierID
        {
            get { return fSupplierID; }
            set { SetPropertyValue<Supplier>("SupplierID", ref fSupplierID, value); }
        }
        DateTime fReceiptDate;
        public DateTime ReceiptDate
        {
            get { return fReceiptDate; }
            set { SetPropertyValue<DateTime>("ReceiptDate", ref fReceiptDate, value); }
        }
        double fAmount;
        public double Amount
        {
            get { return fAmount; }
            set { SetPropertyValue<double>("Amount", ref fAmount, value); }
        }
        Users fCreatedBy;
        public Users CreatedBy
        {
            get { return fCreatedBy; }
            set { SetPropertyValue<Users>("CreatedBy", ref fCreatedBy, value); }
        }
        string fStatus;
        public string Status
        {
            get { return fStatus; }
            set { SetPropertyValue<string>("Status", ref fStatus, value); }
        }
        public Receipt(Session session) : base(session) { }
        public Receipt() : base(Session.DefaultSession) { }
        /// <summary>
        /// Initializes a new instance of the Receipt class.
        /// </summary>
        /// <param name="fReceiptID"></param>
        /// <param name="fSupplierID"></param>
        /// <param name="fReceiptDate"></param>
        /// <param name="fAmount"></param>
        /// <param name="fCreatedBy"></param>
        public Receipt(Session session, int fReceiptID, Supplier fSupplierID, DateTime fReceiptDate, double fAmount, Users fCreatedBy, string fStatus):base(session)
        {
            this.fReceiptID = fReceiptID;
            this.fSupplierID = fSupplierID;
            this.fReceiptDate = fReceiptDate;
            this.fAmount = fAmount;
            this.fCreatedBy = fCreatedBy;
            this.fStatus = fStatus;
        }
        public override void AfterConstruction() { base.AfterConstruction(); }
        /// <summary>
        /// Initializes a new instance of the Receipt class.
        /// </summary>
        /// <param name="fSupplierID"></param>
        /// <param name="fReceiptDate"></param>
        /// <param name="fAmount"></param>
        /// <param name="fCreatedBy"></param>
        public Receipt(Supplier fSupplierID, DateTime fReceiptDate, double fAmount, Users fCreatedBy,string fStatus)
        {
            this.fSupplierID = fSupplierID;
            this.fReceiptDate = fReceiptDate;
            this.fAmount = fAmount;
            this.fCreatedBy = fCreatedBy;
            this.fStatus = fStatus;
        }
    }
}
